import { GetBoothInfoListParams, GetMarketInfoParam } from "#/index";
import { random } from "@/utils/common";

/**
 * 获取商场的信息接口
 */
export const getMaketInfo = (that, options: GetMarketInfoParam) => {
  return that.https.get("/api-urlGisManager-m/mobile/fengmap/malls", {
    params: {
      mallCode: options.mallCode,
      buildingCode: options.buildingCode,
      random: random(),
    },
  });
};

/**
 * 根据楼层获取展位信息
 * @param that
 * @param options
 * @returns
 */
export const getBoothInfoList = (that, options: GetBoothInfoListParams) => {
  return that.https.get("/api-urlGisManager-m/mobile/fengmap/listProductInfo", {
    params: {
      buildingCode: options.buildingCode,
      floorCode: options.floorCode,
      mallCode: options.mallCode,
      random: random(),
    },
  });
};

/**
 * 获取展位的主体颜色
 * @param that
 * @returns
 */
export const getListBoothColor = (that) => {
  return that.https.get(
    "api-urlGisManager-m/mobile/fengmap/layer/listBoothColor",
    {}
  );
};
